package com.shengyo.mobile.model.bean;

import java.util.Date;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.CompareToBuilder;

public class Mobile implements Comparable {

	private int id;
	private String mobile;
	private String linkman;
	private String mobileZone;
	private String provice;
	private String city;
	private String mobileCompany;
	private String postalcode;
	private String phoneZone;
	private String fromSite;
	private String fromPage;
	/**
	 * @return the fromPage
	 */
	public String getFromPage() {
		return fromPage;
	}
	/**
	 * @param fromPage the fromPage to set
	 */
	public void setFromPage(String fromPage) {
		this.fromPage = fromPage;
	}
	private Date createTime;
	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}
	/**
	 * @return the mobile
	 */
	public String getMobile() {
		return mobile;
	}
	/**
	 * @param mobile the mobile to set
	 */
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	/**
	 * @return the linkman
	 */
	public String getLinkman() {
		return linkman;
	}
	/**
	 * @param linkman the linkman to set
	 */
	public void setLinkman(String linkman) {
		this.linkman = linkman;
	}
	/**
	 * @return the mobileZone
	 */
	public String getMobileZone() {
		return mobileZone;
	}
	/**
	 * @param mobileZone the mobileZone to set
	 */
	public void setMobileZone(String mobileZone) {
		this.mobileZone = mobileZone;
	}
	/**
	 * @return the provice
	 */
	public String getProvice() {
		return provice;
	}
	/**
	 * @param provice the provice to set
	 */
	public void setProvice(String provice) {
		this.provice = provice;
	}
	/**
	 * @return the city
	 */
	public String getCity() {
		return city;
	}
	/**
	 * @param city the city to set
	 */
	public void setCity(String city) {
		this.city = city;
	}
	/**
	 * @return the mobileCompany
	 */
	public String getMobileCompany() {
		return mobileCompany;
	}
	/**
	 * @param mobileCompany the mobileCompany to set
	 */
	public void setMobileCompany(String mobileCompany) {
		this.mobileCompany = mobileCompany;
	}
	/**
	 * @return the postalcode
	 */
	public String getPostalcode() {
		return postalcode;
	}
	/**
	 * @param postalcode the postalcode to set
	 */
	public void setPostalcode(String postalcode) {
		this.postalcode = postalcode;
	}
	/**
	 * @return the phoneZone
	 */
	public String getPhoneZone() {
		return phoneZone;
	}
	/**
	 * @param phoneZone the phoneZone to set
	 */
	public void setPhoneZone(String phoneZone) {
		this.phoneZone = phoneZone;
	}
	/**
	 * @return the fromSite
	 */
	public String getFromSite() {
		return fromSite;
	}
	/**
	 * @param fromSite the fromSite to set
	 */
	public void setFromSite(String fromSite) {
		this.fromSite = fromSite;
	}
	/**
	 * @return the createTime
	 */
	public Date getCreateTime() {
		return createTime;
	}
	/**
	 * @param createTime the createTime to set
	 */
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return new ToStringBuilder(this).append("postalcode", this.postalcode)
				.append("mobileCompany", this.mobileCompany).append("mobile",
						this.mobile).append("linkman", this.linkman).append(
						"phoneZone", this.phoneZone).append("fromSite",
						this.fromSite).append("createTime", this.createTime)
				.append("fromPage", this.fromPage).append("mobileZone",
						this.mobileZone).append("provice", this.provice)
				.append("city", this.city).append("id", this.id).toString();
	}
	/**
	 * @see java.lang.Comparable#compareTo(Object)
	 */
	public int compareTo(Object object) {
		Mobile myClass = (Mobile) object;
		return new CompareToBuilder().append(this.id, myClass.id).append(
				this.createTime, myClass.createTime).append(this.postalcode,
				myClass.postalcode).append(this.provice, myClass.provice)
				.append(this.mobileZone, myClass.mobileZone).append(
						this.fromPage, myClass.fromPage).append(this.phoneZone,
						myClass.phoneZone).append(this.mobileCompany,
						myClass.mobileCompany).append(this.linkman,
						myClass.linkman)
				.append(this.fromSite, myClass.fromSite).append(this.city,
						myClass.city).append(this.mobile, myClass.mobile)
				.toComparison();
	}
	/**
	 * @see java.lang.Object#equals(Object)
	 */
	public boolean equals(Object object) {
		if (!(object instanceof Mobile)) {
			return false;
		}
		Mobile rhs = (Mobile) object;
		return new EqualsBuilder().appendSuper(super.equals(object)).append(
				this.id, rhs.id).append(this.createTime, rhs.createTime)
				.append(this.postalcode, rhs.postalcode).append(this.provice,
						rhs.provice).append(this.mobileZone, rhs.mobileZone)
				.append(this.fromPage, rhs.fromPage).append(this.phoneZone,
						rhs.phoneZone).append(this.mobileCompany,
						rhs.mobileCompany).append(this.linkman, rhs.linkman)
				.append(this.fromSite, rhs.fromSite)
				.append(this.city, rhs.city).append(this.mobile, rhs.mobile)
				.isEquals();
	}
	/**
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		return new HashCodeBuilder(-1977819571, 1255704101).appendSuper(
				super.hashCode()).append(this.id).append(this.createTime)
				.append(this.postalcode).append(this.provice).append(
						this.mobileZone).append(this.fromPage).append(
						this.phoneZone).append(this.mobileCompany).append(
						this.linkman).append(this.fromSite).append(this.city)
				.append(this.mobile).toHashCode();
	}

	
}
